package io.renren.modules.generator.controller;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.renren.common.utils.R;
import io.renren.modules.generator.entity.ChargeManagerVO;
import io.renren.modules.generator.entity.GuardianEntity;
import io.renren.modules.generator.entity.SchoolEntity;
import io.renren.modules.generator.entity.StudentEntity;
import io.renren.modules.generator.service.IChargeManagerService;

/**
 * 收费管理
 * @author fanzc
 *
 */
@RestController
@RequestMapping("/generator/chargeManager")
public class ChargeManagerController {
	
	@Autowired
	private IChargeManagerService chargeManagerService;
	
	@RequestMapping("/save")
	@RequiresPermissions("generator:chargeManager:save")
	public R save(@RequestBody ChargeManagerVO chargeManagerVO ) {
		chargeManagerService.save(chargeManagerVO.getStudent(), chargeManagerVO.getSchool(), chargeManagerVO.getGuardian());
		return R.ok();
	}

}
